package com.game.system.domain.game;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.game.common.annotation.Excel;
import com.game.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 游戏设备对象 game_device
 *
 * @author Mr.Liu
 * @date 2025-04-09
 */
@Getter
@Setter
@TableName(resultMap = "com.game.system.mapper.GameDeviceMapper.GameDeviceResult")
public class GameDevice extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 设备id */
    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 设备名称 */
    @Excel(name = "设备名称")
    private String deviceName;

    /** 打斗类型限制 */
    @Excel(name = "打斗类型限制")
    private String gameType;

    /** 是否连接（0：未连接，1：已连接） */
    @Excel(name = "是否连接", readConverterExp = "0=：未连接，1：已连接")
    private String isConnect;

    /** 状态（0：正常、1停用） */
    @Excel(name = "状态", readConverterExp = "0=：正常、1停用")
    private String status;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("deviceName", getDeviceName())
                .append("gameType", getGameType())
                .append("isConnect", getIsConnect())
                .append("status", getStatus())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
